home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / misc / zpoint_3_14.lha / zpoint-3.14 / Rexx / zmime.zprx.old < prev    next >
Text File  |  1996-07-15  |  1KB  |  76 lines

  1. /* zmime.zprx 1.0 (18.4.96) Copyright © Ralph Seichter */
  2.  
  3. zmime    = "Beta:zmime/zmime"
  4. zmimecfg = "Beta:zmime/zmime.config"
  5.  
  6. /*-----------------------------------------------------------------------*/
  7.  
  8. options results
  9. parse arg zpoint
  10.  
  11. zpoint = COMPRESS(zpoint)
  12. if zpoint = "" then
  13.     zpoint = "ZPoint"
  14.  
  15. address value zpoint
  16.  
  17. whichlevel
  18. if result ~= "BOARD" then do
  19.     requestnotify "You are not inside a board!"
  20.     exit
  21. end
  22.  
  23. temp = "T:zmime.zprx-"zpoint
  24. address command "delete "temp" >NIL:"
  25. savemessagebody temp
  26. if ~rc then do
  27.     requestnotify "Can't save message"
  28.     exit
  29. end
  30.  
  31. /* Load file into CED and create the necessary header information */
  32.  
  33. address 'rexx_ced'
  34.  
  35. status numchanges
  36. numch = result
  37. status numlines
  38. numl = result
  39. if (numl > 0 | numch > 0) then
  40.     open new
  41. open temp
  42.  
  43. beg of file
  44. line = 0
  45. do while line < 15
  46.     status linebuffer
  47.     if LEFT(result, 2) == '--' then do
  48.         line = 99
  49.         right
  50.         right
  51.         mark
  52.         'end of line'
  53.         copy
  54.         beg of file
  55.         lf = '0A'X
  56.         text 'MIME-Version: 1.0'lf'Content-Type: multipart/mixed; boundary="'
  57.         paste
  58.         text '"'lf lf
  59.         save
  60.     end
  61.     else do
  62.         down
  63.         line = line + 1
  64.     end
  65. end
  66. quit
  67.  
  68. if line ~= 99 then do
  69.     requestnotify "Can't find boundary"
  70.     exit
  71. end
  72.  
  73. /* Pass file to zmime */
  74.  
  75. address command zmime" "temp" PUBSCREEN "zpoint" CONFIG "zmimecfg
  76.